<template>
  <div class="list">
    <div class="header border-bottom">
      <span class="iconfont icon-header">&#xe609;</span>
      {{recommend.title}}
    </div>
    <div class="main border-bottom" v-for="item in recommend.list" :key="item.id">
      <div class="item-info">
        <p class="desc">{{item.desc}}</p>
        <p class="time">
          <span class="iconfont icon-time">&#xe683;</span>
          {{item.time}}
        </p>
      </div>
      <div class="button">
        <p class="price">￥{{item.price}}</p>
        <button class="btn">预定</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailList",
  props: {
    recommend: Object
  },
  watch: {
    recommend(newVal, oldVal) {
      return newVal;
    }
  }
};
</script>

<style lang="stylus" scoped>
@import '~@/assets/style/variables'

.list
  width: 100%
  padding: 0 0.2rem
  margin-bottom: 0.2rem
  background: #fff
  .header
    height: $headerHeight
    line-height: $headerHeight
    font-size: 0.32rem
    .icon-header
      color: #ff6e6e
  .main
    display: flex
    flex-direction: row
    padding: 0.3rem 0
    justify-content: space-between
    .item-info
      width: 5rem
      color: #616161
      .desc
        font-size: 0.3rem
      .time
        font-size: 0.24rem
        .icon-time
          margin-right: -0.04rem
          font-size: 0.32rem
          color: $bgColor
    .button
      .price
        font-size: 0.4rem
        color: #ff9917
        text-align: center
      button
        width: 1.6rem
        font-size: 0.28rem
        color: white
        text-align: center
        line-height: 0.4rem
        height: 0.6rem
        background: #ff9917
        border: 1px solid #ff9917
        border-radius: 0.08rem
</style>